#include "CarDebug.h"

CarDebug CarDebug::instance;

void CarDebug::SetLogCallback(LogFunction logFunction)
{
	mLogMessageFunction = logFunction;
}

void CarDebug::SetLogWarningCallback(LogFunction logFunction)
{
	mLogWarningFunction = logFunction;
}

void CarDebug::SetLogErrorCallback(LogFunction logFunction)
{
	mLogErrorFunction = logFunction;
}

void CarDebug::Log(const wchar_t* message)
{
	if (mLogMessageFunction != nullptr)
	{
		mLogMessageFunction(message);
	}
}

void CarDebug::LogWarning(const wchar_t* message)
{
	if (mLogWarningFunction != nullptr)
	{
		mLogWarningFunction(message);
	}
}

void CarDebug::LogError(const wchar_t* message)
{
	if (mLogErrorFunction != nullptr)
	{
		mLogErrorFunction(message);
	}
}
